﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Macds.Core.Web;

namespace Macds.Test.Core.Web.Mocks
{
    public class HttpRequestManager : WebRequestBase
    {
        public string GetRemoteDataByPost(string url, string data)
        {
            return this.SendRequest(url, data);
        }

        public string GetRemoteDataByGet(string url, string data)
        {
            return this.SendRequest(url, data, RequestMethod.GET);
        }

        public string GetRemoteDataByAcept(string url, string data, string returnContentType)
        {
            return this.SendRequest(url, data, RequestMethod.GET, returnContentType);
        }

        public string GetRemoteDataWithHeaderAuthorization(string url, string data, string contentType, string authValue)
        {
            var headers = new Dictionary<string, string>();
            headers.Add("Authorization", authValue);
            return this.SendRequest(url, data, RequestMethod.POST, contentType, "", headers);
        }
    }
}
